package com.mentaleye.dal.dao.mybatis;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.mentaleye.dal.dao.PromptReadDao;
import com.mentaleye.dal.model.PromptRead;
import com.mentaleye.dal.service.PromptReadMapper;
@Repository
public class PromptReadDaoImpl implements PromptReadDao {

	@Autowired PromptReadMapper promptReadMapper;
 	@Override
	public boolean insertPromptRead(PromptRead promptRead) {
 		int result = promptReadMapper.insert(promptRead);
		return result>0;
	}

	@Override
	public boolean updatePromptRead(PromptRead promptRead) {
		int result = promptReadMapper.updateByPromptRead(promptRead);
		return result>0;
	}

	@Override
	public PromptRead selectPromptRead(Map<String, Object> map) {
		PromptRead promptRead = promptReadMapper.queryIsExist(map);
		return promptRead;
	}

	@Override
	public boolean modifyPromptRead(Map<String, Object> map) {
		int result = promptReadMapper.updateProRead(map);
		return result>0;
	}

	@Override
	public boolean modifyPromptNoRead(Map<String, Object> map) {
		int result = promptReadMapper.updateProNoRead(map);
		return result>0;
	}

}
